How to update data using api in php mysql